//
//  UIFontExtension.swift
//  WalkNovel
//
//  Created by Kevin on 2023/7/4.
//

import UIKit

extension UIFont {
    
    enum ESFontName: String {
        case regular        = "PingFangSC-Regular"
        case bold           = "PingFangSC-Semibold"
        case national       = "National"
        case floane         = "Floane"
        case medium         = "IntelOneMono-Medium"
    }
    
    static func wn_font(name: ESFontName, size: CGFloat) -> UIFont {
        let font: UIFont? = .init(name: name.rawValue, size: size)
        guard let esfont = font else {
            return .systemFont(ofSize: size)
        }
        return esfont
    }
}

